import React from "react";
import FunObj from "../../Hooks/Counter";
import { PageHeader, Button } from "antd";
const UseCounter: React.FC = (): React.ReactElement => {
    const { count, add, inr, rec } = FunObj.useCount();

    return (

        <div>
            <PageHeader
                className="site-page-header"
                onBack={() => null}
                title="Title"
                subTitle={count}
            />

            <Button onClick={add}>增加</Button>
            <Button onClick={inr}>减少</Button>
            <Button onClick={rec}>重置</Button>
        </div>

    );
};
export default UseCounter;
